import {getArrivalTradeHistoryv232} from '../../../Tools/HTTPOpertion.js';
Page({
  data: {
      popupIf:false,
      obj:{}
  },
  onLoad: function (options) {
    this.loadData();
  },
  loadData: function () {
    var self = this;
    getArrivalTradeHistoryv232().then(function (result) {
      var temp = fn(result.data.notDeposite);
      function fn(a) {
          if (typeof a == 'string') { return a };
          var str = a / 100 + '';
          var i = str.indexOf('.');
          if (i != -1) {
              if (str.length != i + 3) {
                  str += '0';
              }
          } else {
              str += '.00';
          }
          return str;
      };

      self.setData({
        obj: result.data,
        xiaojin:temp
      });
    })
    .catch(function (error) {
      wx.hideLoading()
      console.log(error);
    });
  },
  toInfo:function(e){
    var id = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: '/pages/others/DetailsOfTheBill/DetailsOfTheBill?id='+id,
    })
  },
  zdqxTap: function () {
      wx.navigateTo({
          url: '/pages/others/Kim/Kim',
      })
  },
  //弹窗
  popupTap:function(){
      this.setData({
          popupIf: !this.data.popupIf
      })
  }
})
